<?php
/**
 * Created by littleU.
 * User: littleU
 * Date: 2021-01-29
 * Time: 16:46
 */

namespace app\api\controller\v1\cms;


use app\api\validate\CmsLogin;
use app\api\service\CmsToken as CmsTokenService;

class Token
{
    public function getToken($mobile, $password)
    {
        (new CmsLogin())->goCheck();
        $token = (new CmsTokenService())->get($mobile, $password);
        return json([
            'code' => config('code.success'),
            'data' => [
                'token' => $token
            ]
        ]);
    }
}